from operator import add
from pyspark.sql import SparkSession

spark = SparkSession\
        .builder\
        .appName("PythonWordCount")\
        .getOrCreate()

sc = spark.sparkContext

data = [1, 2, 3, 4, 5]
distData = sc.parallelize(data)